home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / GAS_1_38.ARJ / MAKEFILE < prev    next >
Text File  |  1990-10-18  |  12KB  |  357 lines

  1. # Makefile for GAS.
  2. # Copyright (C) 1989, Free Software Foundation
  3. # This file is part of GAS, the GNU Assembler.
  4. # GAS is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8. # GAS is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GAS; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  15.  
  16. # This makefile may be used to make the VAX, 68020, 80386, 
  17. # SPARC, ns32k, or i860 assembler(s).
  18.  
  19. BINDIR = /usr/local/bin
  20. #CC=gcc
  21.  
  22. # If you are on a BSD system, un-comment the next two lines, and comment out
  23. # the lines for SystemV and HPUX below
  24. G0 = -g  -I. #-O -Wall
  25. LDFLAGS = $(CFLAGS)
  26. #
  27. # To compile gas on a System Five machine, comment out the two lines above
  28. # and un-comment out the next three lines
  29. # Comment out the -lPW on the LOADLIBES line if you are using GCC.
  30. # G0 = -g -I. -DUSG
  31. # LDFLAGS = $(CFLAGS)
  32. # LOADLIBES = -lmalloc -lPW
  33. #
  34. # To compile gas for HPUX, link m-hpux.h to m68k.h , and un-comment the
  35. # next two lines.  (If you are using GCC, comment out the alloca.o part)
  36. # (Get alloca from the emacs distribution, or use GCC.)
  37. # HPUX 7.0 may have a bug in setvbuf.  gas gives an error message like
  38. # 1:"Unknown operator" -- Statement 'NO_APP' ignored
  39. # if setvbuf is broken.  Re-compile input-file.c (and only input-file.c
  40. # with -DVMS and the problem should go away.
  41. #
  42. # G0 = -g -I. -DUSG
  43. # LOADLIBES = alloca.o
  44. #
  45. # To compile gas for a Sequent Symmetry, comment out all the above lines,
  46. # and un-comment the next two lines.
  47. # G0 = -g -I. -DUSE_SYSTEM_HDR -DEXEC_VERSION=1
  48. # LOADLIBES = -lc /usr/att/lib/libc.a
  49.  
  50. # If you just want to compile the vax assembler, type 'make avax'
  51.  
  52. # If you just want to compile the i386 assembler, type 'make a386'
  53.  
  54. # If you just want to compile the ns32k assembler, type 'make a32k'
  55.  
  56. # If you just want to compile the sparc assembler, type 'make asparc'
  57.  
  58. # If you just want to compile the mc68020 assembler, make sure m68k.h
  59. # is correctly set up, and type type 'make a68'  (Except on HPUX machines,
  60. # where you will have to make the changes marked below before typing
  61. # 'make a68'
  62. # m68k.h should be a symbolic or hard-link to one of
  63. # m-sun3.h , m-hpux.h or m-generic.h
  64. # depending on which machine you want to compile the 68020 assembler for.
  65. #
  66. # If you want the 68k assembler to be completely compatable with the the
  67. # SUN one, un-comment the -DSUN_ASM_SYNTAX line below.
  68. #
  69. # If you machine does not have vfprintf, but does have _doprnt(),
  70. # remove the # from the -DNO_VARARGS line below.
  71. #
  72. # If the return-type of a signal-hander is void (instead of int),
  73. # remove the # from the -DSIGTY line below.
  74. #
  75. # To include the mc68851 mmu coprocessor instructions in the 68020 assembler,
  76. # remove the # from the -Dm68851 line below.
  77. #
  78. # If you want the 68020 assembler use a register prefix character, un-comment
  79. # the REGISTER_PREFIX line, and (maybe) change the '%' to the appropriate
  80. # character.
  81. #
  82. # If you want the assembler to treat .L* or ..* symbols as local, instead of
  83. # the usual L* symbols, un-comment the DOT_LABEL_PREFIX line.
  84. #
  85. # If you want the 80386 assembler to correctly handle fsub/fsubr and fdiv/fdivr
  86. # opcodes (unlike most 80386 assemblers), remove the # from
  87. # the -DNON_BROKEN_WORDS line below.
  88. #
  89. # To compile 80386 Gas for the Sequent Symmetry, un-comment the -DEXEC_VERSION
  90. # and the -DUSE_SYSTEM_HDR lines below.
  91. #
  92. # To compile gas for the HP 9000/300 un-comment the -DUSE_HP_HDR line below.
  93. #
  94. # For the ns32k, the options are 32532 or 32032 CPU and 32381 or 32081 FPU.
  95. # To select the NS32532, remove the # from the -DNS32532 line below.
  96. # To compile in tne NS32381 opcodes in addition to the NS32081 opcodes
  97. # (the 32381 is a superset of the 32081), remove the # from the -DNS32381
  98. # line below.
  99. #
  100. # For the ns32k on a Sequent, uncomment the SEQUENT_COMPATABILITY line below.
  101. #
  102. # If you want the .align N directive to align to the next N byte boundry,
  103. # instead of the next 1<<N boundry, un-comment the OTHER_ALIGN line below.
  104. # (This option is automatically enabled when building the sparc assembler.
  105. #
  106.  
  107. O1 =  -DNO_VARARGS
  108. O2 = # -DNON_BROKEN_WORDS
  109. O3 = # -Dm68851
  110. O4 = # -DEXEC_VERSION=1
  111. O5 = # -DSIGTY=void
  112. O6 = # -DNS32532
  113. O6 = # -DNS32381
  114. O7 = # -DDOT_LABEL_PREFIX
  115. O8 = # -DSEQUENT_COMPATABILITY
  116. O9 = # -DREGISTER_PREFIX=\'%\'
  117. O10= # -DOTHER_ALIGN
  118.  
  119. G1 = # -DUSE_SYSTEM_HDR
  120. G2 = # -DUSE_HP_HDR
  121. G3 = # -DSUN_ASM_SYNTAX
  122.  
  123. OPTIONS = $(O1) $(O2) $(O3) $(O4) $(O5) $(O6) $(O7) $(O8) $(O9) $(O10)
  124.  
  125. CFLAGS = $(G0) $(G1) $(G2) $(G3) $(G4)
  126.  
  127. #
  128. # To make the 68020 assembler compile as the default, un-comment the next
  129. # line, and comment out all the other lines that start with DEFAULT_GAS
  130. DEFAULT_GAS=a68
  131. #
  132. # To make the VAX assembler compile as the default, un-comment the next
  133. # line and commment out all the other lines that start with DEFAULT_GAS
  134. #DEFAULT_GAS=avax
  135. #
  136. # To make the 80386 assembler compile as the default, un-comment the next
  137. # line and commment out all the other lines that start with DEFAULT_GAS
  138. #DEFAULT_GAS=a386
  139. #
  140. # To make the ns32k assembler compile as the default, un-comment the next
  141. # line and commment out all the other lines that start with DEFAULT_GAS
  142. #DEFAULT_GAS=a32k
  143. #
  144. # To make the sparc assembler compile as the default, un-comment the next
  145. # line and commment out all the other lines that start with DEFAULT_GAS
  146. #DEFAULT_GAS=asparc
  147. #
  148. # To make the i860 assembler compile as the default, un-comment the next
  149. # line and comment out all the other lines that start with DEFAULT_GAS
  150. #DEFAULT_GAS=a860
  151.  
  152. # Global Sources -------------------------------------------------------------
  153.  
  154. a =\
  155. as.o        xrealloc.o    xmalloc.o    hash.o        hex-value.o   \
  156. atof-generic.o    append.o    messages.o    expr.o        app.o         \
  157. frags.o        input-file.o    input-scrub.o    output-file.o                  \
  158. subsegs.o    symbols.o                    version.o     \
  159. flonum-const.o    flonum-copy.o    flonum-mult.o    strstr.o    bignum-copy.o \
  160. obstack.o
  161. #gdb.o        gdb-file.o    gdb-symbols.o    gdb-blocks.o    gdb-lines.o
  162.  
  163. a:    $(DEFAULT_GAS)
  164.     @rm -f a
  165.     @ln $(DEFAULT_GAS) a
  166.  
  167. # I860 GAS ------------------------------------------------------------------
  168. u = i860.o  atof-ieee.o  write-i860.o  read-i860.o
  169.  
  170. U = i860.c  i860.h i860-opcode.h
  171.  
  172. i860.o:    i860.c i860.h i860-opcode.h as.h frags.h struc-symbol.h
  173. i860.o:    flonum.h expr.h hash.h md.h write.h read.h symbols.h
  174.     $(CC) -c $(CFLAGS) -DI860 i860.c
  175.  
  176. atof-ieee.o:    flonum.h
  177.  
  178. write-i860.o:    write.c i860.h
  179.     $(CC) -c -DI860 $(CFLAGS) write.c
  180.     mv write.o write-i860.o
  181.  
  182. read-i860.o: read.c i860.h
  183.     $(CC) -c -DI860 $(CFLAGS) read.c
  184.     mv read.o read-i860.o
  185.  
  186. a860: $a $u
  187.     $(CC) -o a860 $(LDFLAGS) $a $u $(LOADLIBES)
  188.  
  189. # SPARC GAS ------------------------------------------------------------------
  190. v = sparc.o  atof-ieee.o  write-sparc.o  read-sparc.o
  191.  
  192. V = sparc.c  sparc.h  sparc-opcode.h
  193.  
  194. atof-ieee.o:    flonum.h
  195. sparc.o:    sparc.c sparc.h sparc-opcode.h as.h frags.h struc-symbol.h
  196. sparc.o:    flonum.h expr.h hash.h md.h write.h read.h symbols.h
  197.     $(CC) -c $(CFLAGS) -DSPARC sparc.c
  198.  
  199. write-sparc.o:    write.c
  200.     $(CC) -c -DSPARC $(CFLAGS) write.c
  201.     mv write.o write-sparc.o
  202.  
  203. read-sparc.o: read.c
  204.     $(CC) -c -DSPARC $(CFLAGS) read.c
  205.     mv read.o read-sparc.o
  206.  
  207. asparc: $a $v
  208.     $(CC) -o asparc $(LDFLAGS) $a $v $(LOADLIBES)
  209.  
  210. # NS32K GAS ------------------------------------------------------------------
  211. w = ns32k.o  atof-ieee.o  write-ns32k.o  read-ns32k.o
  212.  
  213. W = ns32k.c ns32k-opcode.h
  214.  
  215. atof-ieee.o:    flonum.h
  216. ns32k.o:    as.h frags.h struc-symbol.h flonum.h expr.h md.h hash.h
  217. ns32k.o:    write.h symbols.h ns32k-opcode.h ns32k.c
  218.     $(CC) $(CFLAGS) $(OPTIONS) -c ns32k.c
  219.  
  220. write-ns32k.o:    write.c
  221.     $(CC) -c -DNS32K $(CFLAGS) write.c
  222.     mv write.o write-ns32k.o
  223.  
  224. read-ns32k.o:
  225.     $(CC) -c -DNS32K $(CFLAGS) read.c
  226.     mv read.o read-ns32k.o
  227.  
  228. a32k: $a $w
  229.     $(CC) -o a32k $(LDFLAGS) $a $w $(LOADLIBES)
  230.  
  231. # 80386 GAS ------------------------------------------------------------------
  232. x = i386.o  atof-ieee.o  write.o  read.o
  233.  
  234. X = i386.c  i386.h  i386-opcode.h
  235.  
  236. i386.o:        i386.c as.h read.h flonum.h frags.h struc-symbol.h expr.h
  237. i386.o:        symbols.h hash.h md.h i386.h i386-opcode.h
  238.     $(CC) $(CFLAGS) $(OPTIONS) -c i386.c
  239.  
  240. atof-ieee.o:    flonum.h
  241.  
  242. a386: $a $x
  243.     $(CC) -o a386 $(LDFLAGS) $a $x $(LOADLIBES)
  244.  
  245. # 68020 GAS ------------------------------------------------------------------
  246. y = m68k.o  atof-ieee.o write.o read.o
  247.  
  248. Y = m68k.c atof-ieee.c m68k-opcode.h m-hpux.h m-sun3.h m-generic.h
  249.  
  250. atof-ieee.o:    flonum.h
  251.  
  252. m68k.o:        m68k.c a.out.gnu.h as.h expr.h flonum.h frags.h hash.h
  253. m68k.o:        m68k-opcode.h m68k.h md.h obstack.h struc-symbol.h
  254.     $(CC) $(CFLAGS) $(OPTIONS) -c m68k.c
  255.  
  256. a68: $a $y
  257.     $(CC) -o a68 $(LDFLAGS) $a $y $(LOADLIBES)
  258.  
  259. # VAX GAS --------------------------------------------------------------------
  260. z = vax.o  atof-vax.o  write.o  read.o
  261.  
  262. Z = vax.c atof-vax.c vax-opcode.h vax-inst.h \
  263.     make-gas.com objrecdef.h vms.c vms-dbg.c README-vms-dbg
  264.  
  265. vax.o:        vax.c a.out.gnu.h as.h expr.h flonum.h frags.h md.h obstack.h
  266. vax.o:        read.h struc-symbol.h symbols.h vax-inst.h vax-opcode.h
  267. atof-vax.o:    as.h flonum.h read.h
  268.  
  269. avax:    $a $z
  270.     $(CC) -o avax $(LDFLAGS) $a $z $(LOADLIBES)
  271.  
  272. # global files ---------------------------------------------------------------
  273.  
  274. as.o: as.c
  275.     $(CC) $(CFLAGS) $(OPTIONS) -c as.c
  276.  
  277. messages.o: messages.c
  278.     $(CC) $(CFLAGS) $(OPTIONS) -c messages.c
  279.  
  280. hash.o:    hash.c
  281.     $(CC) $(CFLAGS) -Derror=as_fatal -c hash.c
  282.  
  283. xmalloc.o:    xmalloc.c
  284.     $(CC) $(CFLAGS) -Derror=as_fatal -c xmalloc.c
  285.  
  286. xrealloc.o:    xrealloc.c
  287.     $(CC) $(CFLAGS) -Derror=as_fatal -c xrealloc.c
  288.  
  289. A =\
  290. as.c        xrealloc.c    xmalloc.c    hash.c        hex-value.c \
  291. atof-generic.c    append.c    messages.c    expr.c        bignum-copy.c \
  292. frags.c        input-file.c    input-scrub.c    output-file.c    read.c \
  293. subsegs.c    symbols.c    write.c                strstr.c \
  294. flonum-const.c    flonum-copy.c    flonum-mult.c    app.c        version.c \
  295. obstack.c \
  296. #gdb.c        gdb-file.c    gdb-symbols.c    gdb-blocks.c \
  297. #gdb-lines.c
  298.  
  299. H = \
  300. a.out.gnu.h    as.h        bignum.h    expr.h        flonum.h \
  301. frags.h        hash.h        input-file.h    md.h     \
  302. obstack.h    read.h        struc-symbol.h    subsegs.h    \
  303. symbols.h    write.h
  304.  
  305. dist: COPYING README ChangeLog $A $H $Z $Y $X $W $V $U Makefile
  306.     echo gas-`sed -n -e '/ version /s/[^0-9.]*\([0-9.]*\).*/\1/p' < version.c` > .fname
  307.     mkdir `cat .fname`
  308.  
  309.     ln COPYING README ChangeLog $A $H $Z $Y $X $W $V $U Makefile `cat .fname`
  310.     tar cvhZf `cat .fname`.tar.Z `cat .fname`
  311.     -rm -r `cat .fname`
  312.     -rm .fname
  313.  
  314. clean:
  315.     rm -f a avax a68 a386 a32k asparc $a $v $w $x $y $z a core gmon.out bugs a.out
  316.  
  317. install:    a
  318.     cp a $(BINDIR)/gas
  319.  
  320.  
  321. # General .o-->.h dependencies
  322.  
  323. app.o:        as.h
  324. as.o:        a.out.gnu.h as.h read.h struc-symbol.h write.h
  325. atof-generic.o:    flonum.h
  326. bignum-copy.o:    bignum.h
  327. expr.o:        a.out.gnu.h as.h expr.h flonum.h obstack.h read.h struc-symbol.h
  328. expr.o:         symbols.h
  329. flonum-const.o:    flonum.h
  330. flonum-copy.o:    flonum.h
  331. flonum-mult.o:    flonum.h
  332. flonum-normal.o:flonum.h
  333. flonum-print.o:    flonum.h
  334. frags.o:    a.out.gnu.h as.h frags.h obstack.h struc-symbol.h subsegs.h
  335. #gdb.o:        as.h
  336. #gdb-blocks.o:    as.h
  337. #gdb-lines.o:    as.h frags.h obstack.h
  338. #gdb-symbols.o:    a.out.gnu.h as.h struc-symbol.h
  339. hash.o:        hash.h
  340. input-file.o:    input-file.h
  341. input-scrub.o:    as.h input-file.h read.h
  342. messages.o:    as.h
  343. obstack.o:    obstack.h
  344. read.o:        a.out.gnu.h as.h expr.h flonum.h frags.h hash.h md.h obstack.h
  345. read.o:        read.h struc-symbol.h symbols.h
  346. subsegs.o:    a.out.gnu.h as.h frags.h obstack.h struc-symbol.h subsegs.h write.h
  347. symbols.o:    a.out.gnu.h as.h frags.h hash.h obstack.h struc-symbol.h symbols.h
  348. write.o:    a.out.gnu.h as.h md.h obstack.h struc-symbol.h subsegs.h
  349. write.o:    symbols.h write.h
  350.  
  351. flonum.h:                    bignum.h
  352.  
  353.